
var initFoodAreaInfoBean;
var getFoodAreaInfoBeanFromOpenPage = function(){
	var foodareainfoBean = {};
	foodareainfoBean.id = jQuery('#idEditor').val();
	
	
	foodareainfoBean.foodId = jQuery('#foodIdEditor').val();
	
	foodareainfoBean.areaId = jQuery('#areaIdEditor').val();
	
	
	return foodareainfoBean;
};

var initFoodAreaInfoPage = function(){
	
	
	
};

var bindFoodAreaInfoUpdateButtom = function(){
	jQuery('#updateEdit').unbind('click').click(function(){
		var foodareainfoBean = getFoodAreaInfoBeanFromOpenPage();
		if(null != foodareainfoBean){
			doSaveFoodAreaInfos([foodareainfoBean]);
		}
	});
};
var bindFoodAreaInfoResetButtom = function(){
	jQuery('#resetEdit').unbind('click').click(function(){
		if(!initFoodAreaInfoBean){
			jQuery("#foodIdEditor").val('');
			jQuery("#areaIdEditor").val('');
		}else{
			if(!initFoodAreaInfoBean.foodId){
				jQuery("#foodIdEditor").val('');
			}else{
				jQuery("#foodIdEditor").val(initFoodAreaInfoBean.foodId);
			}
			if(!initFoodAreaInfoBean.areaId){
				jQuery("#areaIdEditor").val('');
			}else{
				jQuery("#areaIdEditor").val(initFoodAreaInfoBean.areaId);
			}
		}
	});
};



jQuery(function(){
	initFoodAreaInfoPage();
	bindFoodAreaInfoUpdateButtom();
	bindFoodAreaInfoResetButtom();
});